package com.pluginsacceptor.plugin.formula.statistics;

import com.pluginsacceptor.plugin.formula.MathsTrigo.AbstractListener;
import com.pluginsacceptor.plugin.formula.MathsTrigo.support.DataListener;
import com.pluginsacceptor.plugin.formula.MathsTrigo.support.DataSender;
import com.pluginsacceptor.plugin.formula.MathsTrigo.support.MathData;

public class NbListenerCalcul extends AbstractListener {
	
	 /**
     * Constructor
     * @param dataListener
     * @param dataSender
     */
	
	    public NbListenerCalcul (final DataListener dataListener, final DataSender dataSender) {
	        super(dataListener, dataSender);
	    }

	    @Override
	    protected  double calculate() {
	    	Statistics s = new Statistics(); 
	    	double result = s.nb(MathData.silentParse(this.getUserData()));
			return  result;
	    }
		
}
